In order to measure current flowing through a circuit in a semiconductor device (IC chip), it has been hitherto required to mount a measurement target terminal in a chip and measure the current by an external current tester. The current measurement of circuits in a chip is utilized to check defects of the circuits in an IC chip before the IC chip is manufactured and shipped, or to specify a defective circuit in an IC chip under malfunction, for example.
JP-A-62-245779 discloses a deflection circuit which compares a held voltage value with a set value and uses the difference value therebetween.
Japanese patent No. 3,471,256 discloses an A/D converter which has first and second comparators for comparing an input voltage value held in a sample hold circuit with a voltage value output from a digital/analog converter, selectively outputs a comparison result signal of the first and second comparators on the basis of a select signal output from a control circuit and settles a digital signal value in accordance with the comparison result signal supplied from a selector.
JP-A-09-98089 discloses a D/A conversion circuit having plural current sources provided to generate a reference voltage, a switch circuit for arbitrarily selecting a current source and stepwise setting a current value, an integration circuit for generating and varying a reference voltage at the speed corresponding to the set current value, and a control circuit for controlling the next connection of the switch circuit in accordance with the comparison result between the input signal and the reference voltage.
However, in order to measure current flowing through a circuit in an IC chip (semiconductor device), the measurement must be carried out while the probe of a current tester is brought into contact with a measurement target terminal provided to the IC chip. Therefore, the measurement is cumbersome, and it takes a long time to carry out the measurement.